package crivia.eca.am2.carry;

import java.util.List;

import crivia.c.a.KeyLink;
import crivia.c.carry.SubCarry;
import crivia.c.carry.ValueField;
import crivia.c.exception.CarryIOFail;
import crivia.ecp.a.ECC;
import crivia.src.CI;

public class ActionModel2DeployField extends ECC {
	
	static {
		if (!createTable(ActionModel2DeployField.class, true)){
			throw new CarryIOFail("Data Base Table Create Fail.");
		}
	}
	
	public static void main(String[] args) {
		CI.refreshDBI(ActionModel2DeployField.class);
		CI.refreshFields(ActionModel2DeployField.class);
	}

	@Override
	public String tableName() {
		return "Crivia_AM2_DeployField";
	}

	@Override
	public void keyLinks(List<KeyLink> keyLinks) {
		keyLinks.add(SubCarry.c2d("am2Deploy", ActionModel2Deploy.class));
		keyLinks.add(SubCarry.c2d("am2Field", ActionModel2Field.class));
		keyLinks.add(SubCarry.c2d("am2", ActionModel2.class));
		keyLinks.add(SubCarry.c2d("wmField", WorkflowModelField.class));
		keyLinks.add(ValueField.c2d("showOrder",int.class));
		keyLinks.add(ValueField.c2d("fixValue"));
	}


	
	//XXX DBI Begin.
	public enum Keys{
		am2Deploy("am2Deploy","am2Deploy")
		,am2Field("am2Field","am2Field")
		,am2("am2","am2")
		,wmField("wmField","wmField")
		,showOrder("showOrder","showOrder")
		,fixValue("fixValue","fixValue")
		;
		private String _dbKey;
		private String _key;
		Keys(String key,String dbKey){_key=key;_dbKey=dbKey;}
		@Override
		public String toString(){return _dbKey;}
		/**  <b>Key</b> in <b>Carry</b>. */
		public String key(){return _key;}
	}
	private static crivia.eca.am2.carry.ActionModel2DeployField dbi;
	public synchronized static void initDBI(){if(null!=dbi)return;dbi=new crivia.eca.am2.carry.ActionModel2DeployField();}
	/**  <b>DB Table</b> of <b>Carry</b>. */
	public static String table(){initDBI();return dbi.tableName();}
	/**  <b>Primary Key</b> of <b>Carry</b>. */
	public static String pk(){initDBI();return dbi.pk4db();}
	/**  <b>Relation SQL</b> of <b>Relation Key</b>. */
	public static String rSQL(crivia.eca.am2.carry.ActionModel2DeployField.Keys k,String t){initDBI();return dbi.relationSQL(k.key(),t);}
	//XXX DBI End.



	

	// XXX Fields Begin.



	/** ...(Miss Tip Text.) */
	private java.lang.String id;
	/** Getter for ...(Miss Tip Text.) */
	public java.lang.String getId(){
		return id;
	}
	/** Setter for ...(Miss Tip Text.) */
	public crivia.eca.am2.carry.ActionModel2DeployField setId(java.lang.String id){
		this.id = id;
		return this;
	}


	/** ...(Miss Tip Text.) */
	private crivia.eca.am2.carry.ActionModel2Deploy am2Deploy;
	/** Getter for ...(Miss Tip Text.) */
	public crivia.eca.am2.carry.ActionModel2Deploy getAm2Deploy(){
		if (null == am2Deploy){
			am2Deploy = new crivia.eca.am2.carry.ActionModel2Deploy();
		}
		return am2Deploy;
	}
	/** Setter for ...(Miss Tip Text.) */
	public crivia.eca.am2.carry.ActionModel2DeployField setAm2Deploy(crivia.eca.am2.carry.ActionModel2Deploy am2Deploy){
		this.am2Deploy = am2Deploy;
		return this;
	}


	/** ...(Miss Tip Text.) */
	private crivia.eca.am2.carry.ActionModel2Field am2Field;
	/** Getter for ...(Miss Tip Text.) */
	public crivia.eca.am2.carry.ActionModel2Field getAm2Field(){
		if (null == am2Field){
			am2Field = new crivia.eca.am2.carry.ActionModel2Field();
		}
		return am2Field;
	}
	/** Setter for ...(Miss Tip Text.) */
	public crivia.eca.am2.carry.ActionModel2DeployField setAm2Field(crivia.eca.am2.carry.ActionModel2Field am2Field){
		this.am2Field = am2Field;
		return this;
	}


	/** ...(Miss Tip Text.) */
	private crivia.eca.am2.carry.ActionModel2 am2;
	/** Getter for ...(Miss Tip Text.) */
	public crivia.eca.am2.carry.ActionModel2 getAm2(){
		if (null == am2){
			am2 = new crivia.eca.am2.carry.ActionModel2();
		}
		return am2;
	}
	/** Setter for ...(Miss Tip Text.) */
	public crivia.eca.am2.carry.ActionModel2DeployField setAm2(crivia.eca.am2.carry.ActionModel2 am2){
		this.am2 = am2;
		return this;
	}


	/** ...(Miss Tip Text.) */
	private crivia.eca.am2.carry.WorkflowModelField wmField;
	/** Getter for ...(Miss Tip Text.) */
	public crivia.eca.am2.carry.WorkflowModelField getWmField(){
		if (null == wmField){
			wmField = new crivia.eca.am2.carry.WorkflowModelField();
		}
		return wmField;
	}
	/** Setter for ...(Miss Tip Text.) */
	public crivia.eca.am2.carry.ActionModel2DeployField setWmField(crivia.eca.am2.carry.WorkflowModelField wmField){
		this.wmField = wmField;
		return this;
	}


	/** ...(Miss Tip Text.) */
	private int showOrder;
	/** Getter for ...(Miss Tip Text.) */
	public int getShowOrder(){
		return showOrder;
	}
	/** Setter for ...(Miss Tip Text.) */
	public crivia.eca.am2.carry.ActionModel2DeployField setShowOrder(int showOrder){
		this.showOrder = showOrder;
		return this;
	}


	/** ...(Miss Tip Text.) */
	private java.lang.String fixValue;
	/** Getter for ...(Miss Tip Text.) */
	public java.lang.String getFixValue(){
		return fixValue;
	}
	/** Setter for ...(Miss Tip Text.) */
	public crivia.eca.am2.carry.ActionModel2DeployField setFixValue(java.lang.String fixValue){
		this.fixValue = fixValue;
		return this;
	}


	// XXX Fields End.

}